package com.netease.i;

import java.io.IOException;
import java.io.InputStream;

public class a extends InputStream
{
  private static Object[] b = new Object[0];
  private static int c = 0;
  private static int d = 0;
  private static c e;
  private static long f = 0L;
  private static final int g = 2;
  protected InputStream a;
  private int h;
  private int i;
  private int j;
  private long k;
  private c l;

  public a(InputStream paramInputStream)
  {
    if (paramInputStream == null)
      throw new IllegalArgumentException("in is null");
    this.a = paramInputStream;
    this.k = System.currentTimeMillis();
  }

  public static void a()
  {
    synchronized (b)
    {
      c = d >> 2;
      d = 0;
      if (e != null)
        e.a(3, c);
      return;
    }
  }

  // ERROR //
  private void a(int paramInt)
  {
    // Byte code:
    //   0: iload_1
    //   1: ifle +87 -> 88
    //   4: aload_0
    //   5: monitorenter
    //   6: aload_0
    //   7: iload_1
    //   8: aload_0
    //   9: getfield 68	com/netease/i/a:j	I
    //   12: iadd
    //   13: putfield 68	com/netease/i/a:j	I
    //   16: aload_0
    //   17: iload_1
    //   18: aload_0
    //   19: getfield 70	com/netease/i/a:i	I
    //   22: iadd
    //   23: putfield 70	com/netease/i/a:i	I
    //   26: aload_0
    //   27: monitorexit
    //   28: getstatic 31	com/netease/i/a:b	[Ljava/lang/Object;
    //   31: astore_3
    //   32: aload_3
    //   33: monitorenter
    //   34: getstatic 37	com/netease/i/a:f	J
    //   37: iload_1
    //   38: i2l
    //   39: ladd
    //   40: putstatic 37	com/netease/i/a:f	J
    //   43: iload_1
    //   44: getstatic 35	com/netease/i/a:d	I
    //   47: iadd
    //   48: putstatic 35	com/netease/i/a:d	I
    //   51: aload_3
    //   52: monitorexit
    //   53: aload_0
    //   54: getfield 72	com/netease/i/a:l	Lcom/netease/i/c;
    //   57: ifnull +14 -> 71
    //   60: aload_0
    //   61: getfield 72	com/netease/i/a:l	Lcom/netease/i/c;
    //   64: iconst_5
    //   65: iload_1
    //   66: invokeinterface 74 3 0
    //   71: getstatic 60	com/netease/i/a:e	Lcom/netease/i/c;
    //   74: ifnull +14 -> 88
    //   77: getstatic 60	com/netease/i/a:e	Lcom/netease/i/c;
    //   80: bipush 7
    //   82: iload_1
    //   83: invokeinterface 74 3 0
    //   88: return
    //   89: astore_2
    //   90: aload_0
    //   91: monitorexit
    //   92: aload_2
    //   93: athrow
    //   94: astore 4
    //   96: aload_3
    //   97: monitorexit
    //   98: aload 4
    //   100: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   6	28	89	finally
    //   90	92	89	finally
    //   34	53	94	finally
    //   96	98	94	finally
  }

  public static void a(long paramLong)
  {
    f = paramLong;
  }

  public static void b(c paramc)
  {
    e = paramc;
  }

  public static int e()
  {
    return c;
  }

  public static long f()
  {
    return f;
  }

  public void a(c paramc)
  {
    this.l = paramc;
  }

  public int available()
  {
    return this.a.available();
  }

  public void b()
  {
    monitorenter;
    try
    {
      this.h = (this.i >> 2);
      this.i = 0;
      monitorexit;
      if (this.l != null)
        this.l.a(1, this.h);
      return;
    }
    finally
    {
      monitorexit;
    }
    throw localObject;
  }

  public int c()
  {
    return this.h;
  }

  public void close()
  {
    if (this.a != null);
    try
    {
      this.a.close();
      super.close();
      label18: this.a = null;
      return;
    }
    catch (IOException localIOException)
    {
      break label18;
    }
  }

  public int d()
  {
    long l1 = (System.currentTimeMillis() - this.k) / 1000L;
    if (l1 <= 0L)
      l1 = 1L;
    return (int)(this.j / l1);
  }

  public int read()
  {
    int m = this.a.read();
    if (m > -1)
      a(1);
    return m;
  }

  public int read(byte[] paramArrayOfByte)
  {
    return read(paramArrayOfByte, 0, paramArrayOfByte.length);
  }

  public int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    int m = this.a.read(paramArrayOfByte, paramInt1, paramInt2);
    a(m);
    return m;
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.i.a
 * JD-Core Version:    0.6.0
 */